//
//  LoopScrollView.h
//  HelloInstallment
//
//  Created by 文彬 on 15/1/12.
//  Copyright (c) 2015年 文彬. All rights reserved.
//
/*----------------------------------------------------------------
 // Copyright (C)
 //
 // 文件功能描述：循环滚动的广告页面
 
 // 注意事项：
 //
 ----------------------------------------------------------------*/

#import <UIKit/UIKit.h>

@protocol WBLoopScrollViewDelegate <NSObject>

//总共的页数
- (NSInteger)numOfTotalPageCount;

//单个页面的布局
- (UIView*)viewForPageIndex:(NSInteger)index;


/**
 滚动到了某页

 @param page 页码
 */
- (void)didScrollPage:(NSInteger)page;

@end

@interface WBLoopScrollView : UIView

@property (nonatomic, strong) UIPageControl *pageControl;
@property (nonatomic, strong) UILabel *pageLabel;

@property(weak, nonatomic) id<WBLoopScrollViewDelegate>delegate;

//唯一初始化函数
- (id)initWithFrame:(CGRect)frame animationDuration:(NSTimeInterval)animationDuration;

//开始自动翻页
- (void)startTimer;

//停止自动翻页
- (void)stopTimer;

//刷新页面布局
- (void)layoutPages;

@end
